package com.example.check.validator.test;

import com.example.check.ConditionJointOnly;
import com.example.check.validator.ConditionJointOnlyValidator;

/**2个字段联合校验*/
@ConditionJointOnly.List({
        @ConditionJointOnly(message = "A为22时，B只能为33",
                conditionName = "fieldA", resultName="fieldB",
                conditionValue = "22", resultValue = {ConditionJointOnlyValidator.NOT_BLACK}),
        @ConditionJointOnly(message = "A为mm时，B只能为nn",
                conditionName = "fieldA", resultName="fieldB",
                conditionValue = "mm", resultValue = {"nn"})

})
public class DemoRequest {

    private String fieldA;

    private String fieldB;

    public String getFieldA() {
        return fieldA;
    }

    public void setFieldA(final String fieldA) {
        this.fieldA = fieldA;
    }

    public String getFieldB() {
        return fieldB;
    }

    public void setFieldB(final String fieldB) {
        this.fieldB = fieldB;
    }
}
